﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Users.aspx.cs" Inherits="Admin_Users" MasterPageFile="~/Admin/AdminMasterPage.master" %>

<asp:Content ID="Content1" runat="Server" ContentPlaceHolderID="ContentPlaceHolder1">
<script  type="text/javascript" language="javascript">
    function onCancel() {
        return false;
    }
</script>
<h2>Пользователи</h2>
    <asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="false"  BorderColor="#DFDFDF" BorderStyle="None" BorderWidth="1px" AllowPaging="false"
        ForeColor="Black" GridLines="Vertical" OnRowDataBound="gvUsers_RowBound">
         <RowStyle BackColor="#EFEFEF" VerticalAlign="Middle" />
       <HeaderStyle BackColor="Gray" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="#DFDFDF" />
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="Пользователь" HeaderStyle-CssClass="StatsHeader" ItemStyle-Width="250px"/>
            <asp:TemplateField HeaderText="Действие" HeaderStyle-CssClass="StatsHeader">
            <ItemTemplate>
                 <asp:ImageButton runat="server" ID="imgDelete" CommandArgument='<%# Eval("ID")%>'
                            AlternateText="Delete" ToolTip="Удалить галерею" ImageUrl="~/Admin/images/delete.png"
                            OnClick="btnDeleteUser_Click" />    
            </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <table>
        <tr>
            <td>
                <asp:Label runat="server" CssClass="RegularText" ID="lblAddPartner" Text="Добавить Пользователя:"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label runat="server" CssClass="RegularText" ID="lblAddPartnerText" Text="Имя пользователя:"></asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" CssClass="TextField" ID="txtUserName"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label runat="server" CssClass="RegularText" ID="lblAddPartnerLink" Text="Пароль:"></asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" CssClass="TextField" ID="txtPassword"  TextMode="Password"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button runat="server" ID="btnAddUser" Text="Добавить" 
                    onclick="btnAddUser_Click" />
            </td>
        </tr>
    </table>
</asp:Content>